from datetime import datetime

date_str = input("请输入日期：")

formats = ["%Y/%m/%d","%Y%m%d","%Y-%m-%d"]

date_obj = None
for fmt in formats:
    try:
        date_obj = datetime.strptime(date_str, fmt)
        break
    except ValueError:
        continue

if date_obj:
    print(f"转换后的日期：{date_obj.date()}")
else:
    print("日期格式非法")